package init

import (
	"github.com/spf13/viper"
	"log"
	"user-srv/basic/config"
)

func InitConfig() {
	viper.SetConfigFile("../../dev.yaml")
	err := viper.ReadInConfig()
	if err != nil {
		panic("读取错误")
	}
	err = viper.Unmarshal(&config.AppConfi)
	if err != nil {
		panic("解析错误")
	}
	log.Println(config.AppConfi)
}
